#ifndef __QSTACK__H___
#define __QSTACK__H___
#define QSTACKBUFF_SIZE 256
#define QSTACKMAXNUM 10
typedef struct QstackStruct
{
    unsigned int head;
    unsigned char buff[QSTACKBUFF_SIZE];
} QstackStructType;
typedef enum
{
    QStackFull = 0,
    QStackNull,
    QStackOverNum,
    QStackOk,
    QStackLockOutNum,
    QStackLockRegisterError,

} QStack_enumType;
QStack_enumType QstackInit(QstackStructType *cb);
QStack_enumType QstackRegister(void (*lock)(int), void (*ulock)(int));
QStack_enumType QstackWrite(QstackStructType *cb, char data, int lockNum); //栈满的话就不会存了
QStack_enumType QstackRead(QstackStructType *cb, char *data, int lockNum);

// 互斥锁回调
typedef struct QstackCallbackStruct
{
    void (*QstackCbLock)(int);
    void (*QstackCbULock)(int);
} QstackCallbackStructType;

#endif